package com.shopping.service;

import java.util.List;
import java.util.Map;

import com.shopping.bean.Goods;
import com.shopping.bean.Page;

public interface GoodsService {

	/**
	 * 根据关键字查找商品
	 * @param keyword
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	Page<Goods> getGoods(String keyword,int pageNum,int pageSize);
	
	/**
	 * 获取商品信息，用于将商品信息添加到页面
	 * @param gType
	 * @return
	 */
	List<Goods> selectGoos(String gType,int pageNum,int pageSize);
	
	/**
	 * 通过商品id查询
	 * @param gId
	 * @return
	 */
	Goods selectGoodsById(int gId);
	
	Map<String,Object> findGoodsByName(String name);
	
	List<Goods> findAll();
	
	int addGoods(Goods goods);
	
	Page<Goods> findGoods(Map<String,String[]> condition);

	String insertGoodsGoShopCar(int userId,int goodsId,int goodsNum);
	
	int changeGoods(Goods newGoods,Goods oldGoods);
	
	int delGoodsById(int goodsId);
	
}
